package com.evolved.automata.experimental.tests;
import java.util.*;
import java.io.*;

public class SimpleConsoleInterpreter {

	/**
	 * @param args
	 */
	private ConsoleLineInputReader j_Reader;
	public SimpleConsoleInterpreter(ConsoleLineInputReader reader)
	{
		j_Reader=reader;
	}

	public void Start()
	{
		try
		{
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

			while (j_Reader.ProcessLine(reader.readLine()))
			{
				
			}
		}
		catch (Exception e)
		{
			java.io.StringWriter traceText = new java.io.StringWriter();
			java.io.PrintWriter pWriter = new java.io.PrintWriter(traceText,true);
			e.printStackTrace(pWriter);
			pWriter.close();
			throw new RuntimeException(traceText.toString());
		}
	}
}
